require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 1,["5"] = 1,["6"] = 2,["7"] = 2,["8"] = 4,["9"] = 4,["10"] = 4,["11"] = 4,["13"] = 4,["14"] = 6,["15"] = 12,["16"] = 13,["17"] = 14,["18"] = 15,["19"] = 16,["21"] = 12,["22"] = 4});
local ____exports = {}
local ____Ecs = require("solar.ecs.Ecs")
local System = ____Ecs.System
local ____UnitCom = require("solar.ecs.UnitCom")
local UnitCom = ____UnitCom.default
____exports.default = __TS__Class()
local UnitSystem = ____exports.default
UnitSystem.name = "UnitSystem"
__TS__ClassExtends(UnitSystem, System)
function UnitSystem.prototype.____constructor(self)
    System.prototype.____constructor(self, {UnitCom.type}, 1000)
end
function UnitSystem.prototype.update(self, time, delta, entity)
    local u = UnitCom:oneFrom(entity).data.value
    if not u:isHero() and not u:isAlive() then
        u:destroy()
        self.world:removeEntity(entity)
    end
end
____exports.default = UnitSystem
return ____exports
